package edu.java.lectures.lec02;

public class SegmentLengthCalc {

    // --- Methods -------------------------------------------------------------

    public static void main(String[] args) {
	Segment2D segment = new Segment2D(0, 0, 0, 1);

	// BAD PRACTISE - invocation by class instance
	// double segLenght = segment.getLength(segment);

	// GOOD PRACTISE - invocation by class name
	double segLenght = Segment2D.getLength(segment);

	System.out.println(segLenght);
    }
}
